<template>
  <div>
    <div class="parent">
      {{count}}
      <br /><br />
      <el-button type="primary" @click="btnClick">add</el-button>
    </div>

    <Child :my-count="count" @jianfa="jianfa"></Child>

    <span>{{pValue}}</span>
    <child2 v-bind:someProp.sync="pValue"></child2>
  </div>
</template>
<script>
import Child from '@/views/test/Child'
import Child2 from '@/views/test/Child2'
export default {
  components : {Child, Child2},
  data(){
    return{
      count : 0,
      pValue : "123"
    }
  },
  methods : {
    btnClick(){
      this.count++;
    },
    jianfa(ret){
      console.log(ret)
      this.count--;
    }
  }
}
</script>

<style scoped>
div.parent{
  width: 600px;
  height: 200px;
  margin: 0 auto;
  border: 1px solid #0d4cea;
  text-align: center;
  font-size: 16px;
}
</style>
